# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=gulkan
pkgver=0.15.2
pkgrel=3
pkgdesc="GLib library for Vulkan abstraction"
url="https://gitlab.freedesktop.org/xrdesktop/gulkan"
arch="all"
license="MIT AND CC-BY-SA-4.0"
depends_dev="gobject-introspection-dev"
makedepends="$depends_dev
	glslang
	gdk-pixbuf-dev
	graphene-dev
	gtk-doc
	meson
	vulkan-loader-dev
	"
source="https://gitlab.freedesktop.org/xrdesktop/gulkan/-/archive/$pkgver/gulkan-$pkgver.tar.gz
	fix_incompatible_types.patch"
subpackages="$pkgname-dev"
options="!check" # Requires a working Vulkan driver

build() {
	abuild-meson \
		-Dapi_doc=true \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
abddaa6c40ad260e52bca06377c37b8bac5a3ee884374df076de9903c1a6e946e1b9f8f5a794a629025c88b4fe19cf5ae0b2cc8570e696741173a89a2a98ef57  gulkan-0.15.2.tar.gz
9f39c5ad4d4341b9defeb43fd0c09023452825ae4be7080e115baf18b009b69b3191aae5cc51c8f0f0a871a5d12ce301b3adcdc7f9cb657b93c82df44ae10b03  fix_incompatible_types.patch
"
